package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HomepageResourceMapper;
import com.ruoyi.system.domain.HomepageResource;
import com.ruoyi.system.service.IHomepageResourceService;

/**
 * 首页资源Service业务层处理
 * 
 * @author xin
 * @date 2024-04-21
 */
@Service
public class HomepageResourceServiceImpl implements IHomepageResourceService 
{
    @Autowired
    private HomepageResourceMapper homepageResourceMapper;

    /**
     * 查询首页资源
     * 
     * @param id 首页资源主键
     * @return 首页资源
     */
    @Override
    public HomepageResource selectHomepageResourceById(Long id)
    {
        return homepageResourceMapper.selectHomepageResourceById(id);
    }

    /**
     * 查询首页资源列表
     * 
     * @param homepageResource 首页资源
     * @return 首页资源
     */
    @Override
    public List<HomepageResource> selectHomepageResourceList(HomepageResource homepageResource)
    {
        return homepageResourceMapper.selectHomepageResourceList(homepageResource);
    }

    /**
     * 新增首页资源
     * 
     * @param homepageResource 首页资源
     * @return 结果
     */
    @Override
    public int insertHomepageResource(HomepageResource homepageResource)
    {
        return homepageResourceMapper.insertHomepageResource(homepageResource);
    }

    /**
     * 修改首页资源
     * 
     * @param homepageResource 首页资源
     * @return 结果
     */
    @Override
    public int updateHomepageResource(HomepageResource homepageResource)
    {
        return homepageResourceMapper.updateHomepageResource(homepageResource);
    }

    /**
     * 批量删除首页资源
     * 
     * @param ids 需要删除的首页资源主键
     * @return 结果
     */
    @Override
    public int deleteHomepageResourceByIds(Long[] ids)
    {
        return homepageResourceMapper.deleteHomepageResourceByIds(ids);
    }

    /**
     * 删除首页资源信息
     * 
     * @param id 首页资源主键
     * @return 结果
     */
    @Override
    public int deleteHomepageResourceById(Long id)
    {
        return homepageResourceMapper.deleteHomepageResourceById(id);
    }
}
